<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/lib/layui-v2.6.3/css/layui.css" media="all">
    <link rel="stylesheet" href="/css/public.css" media="all">
</head>

<body>
    <div class="layuimini-container">
        <div class="layuimini-main">

            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
                <legend>添加站点</legend>
            </fieldset>

            <form class="layui-form" action="">

                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">站点ID</label>
                        <div class="layui-input-inline">
                            <input type="tel" name="phone" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">运营商ID</label>
                        <div class="layui-input-inline">
                            <input type="text" name="email" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">设备所属ID</label>
                        <div class="layui-input-inline">
                            <input type="text" name="number" class="layui-input">
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">站点名称</label>
                    <div class="layui-input-block">
                        <input type="text" name="title" lay-verify="title" autocomplete="off" placeholder="站点名称"
                            class="layui-input" lay-reqtext="站点名称不能为空">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">独立报桩</label>
                    <div class="layui-input-block">
                        <input type="radio" name="sex" value="否" title="否" checked="checked">
                        <input type="radio" name="sex" value="是" title="是">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">公共</label>
                    <div class="layui-input-block">
                        <input type="radio" name="sex" value="否" title="否" checked="checked">
                        <input type="radio" name="sex" value="是" title="是">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">国家地区</label>
                    <div class="layui-input-inline">
                        <select name="quiz1">
                            <option value="">请选择省</option>
                            <option value="浙江" selected="">浙江省</option>
                            <option value="你的工号">江西省</option>
                            <option value="你最喜欢的老师">福建省</option>
                        </select>
                    </div>
                    <div class="layui-input-inline">
                        <select name="quiz2">
                            <option value="">请选择市</option>
                            <option value="杭州">杭州</option>
                            <option value="宁波" disabled="">宁波</option>
                            <option value="温州">温州</option>
                            <option value="温州">台州</option>
                            <option value="温州">绍兴</option>
                        </select>
                    </div>
                    <div class="layui-input-inline">
                        <select name="quiz3">
                            <option value="">请选择县/区</option>
                            <option value="西湖区">西湖区</option>
                            <option value="余杭区">余杭区</option>
                            <option value="拱墅区">临安市</option>
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">详细地址</label>
                    <div class="layui-input-block">
                        <input type="text" name="identity" placeholder="" autocomplete="off" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">站点电话</label>
                        <div class="layui-input-inline">
                            <input type="tel" name="phone" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">服务电话</label>
                        <div class="layui-input-inline">
                            <input type="text" name="email" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">车位数量</label>
                        <div class="layui-input-inline">
                            <input type="text" name="number" class="layui-input">
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">站点类型</label>
                        <div class="layui-input-inline">
                            <select name="quiz">
                                <option value="">直接选择</option>
                                <option value="公共">公共</option>
                                <option value="个人">个人</option>
                                <option value="公交专用">公交专用</option>
                                <option value="环卫专用">环卫专用</option>
                                <option value="物流专用">物流专用</option>
                                <option value="出租车专用">出租车专用</option>
                                <option value="其他">其他</option>
                            </select>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">站点状态</label>
                        <div class="layui-input-inline">
                            <select name="quiz">
                                <option value="">直接选择</option>
                                <option value="未知">未知</option>
                                <option value="建设中">建设中</option>
                                <option value="关闭下线">关闭下线</option>
                                <option value="维护中">维护中</option>
                                <option value="正常">正常</option>
                            </select>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">建设场所</label>
                        <div class="layui-input-inline">
                            <select name="modules" lay-verify="required" lay-search="">
                                <option value="">直接选择</option>
                                <option value="居民区">居民区</option>
                                <option value="公共机构">公共机构</option>
                                <option value="企事业单位">企事业单位</option>
                                <option value="写字楼">写字楼</option>
                                <option value="工业园区">工业园区</option>
                                <option value="交通枢纽">交通枢纽</option>
                                <option value="城市绿地">城市绿地</option>
                                <option value="大型建筑配建车位">大型建筑配建车位</option>
                                <option value="路边停车位">路边停车位</option>
                                <option value="城际服务区">城际服务区</option>
                                <option value="高速服务区">高速服务区</option>
                                <option value="其他">其他</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">全天开放</label>
                    <div class="layui-input-block">
                        <input type="radio" name="sex" value="否" title="否" checked="checked">
                        <input type="radio" name="sex" value="是" title="是">
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">经度</label>
                        <div class="layui-input-inline">
                            <input type="tel" name="phone" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">纬度</label>
                        <div class="layui-input-inline">
                            <input type="text" name="email" class="layui-input">
                        </div>
                    </div>
                </div>


                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">适用车型描述</label>
                    <div class="layui-input-block">
                        <textarea placeholder="描述站点接受的车辆大小及类型，如大巴、物流车、私家车、出租车等" class="layui-textarea"></textarea>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">最低充电费率</label>
                        <div class="layui-input-inline">
                            <input type="tel" name="phone" class="layui-input" placeholder="0.00">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">充电费率</label>
                        <div class="layui-input-inline">
                            <input type="text" name="email" class="layui-input" placeholder="0.00">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">服务费率</label>
                        <div class="layui-input-inline">
                            <input type="text" name="number" class="layui-input" placeholder="0.00">
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">免费停车</label>
                    <div class="layui-input-block">
                        <input type="radio" name="sex" value="否" title="否" checked="checked">
                        <input type="radio" name="sex" value="是" title="是">
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">停车费</label>
                        <div class="layui-input-inline">
                            <input type="tel" name="phone" class="layui-input" placeholder="0.00">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">支付方式</label>
                        <div class="layui-input-inline">
                            <input type="text" name="email" class="layui-input" placeholder="0.00">
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">停车收费类型</label>
                        <div class="layui-input-inline">
                            <select name="quiz">
                                <option value="">直接选择</option>
                                <option value="停车收费">停车收费</option>
                                <option value="停车免费">停车免费</option>
                                <option value="限时免费">限时免费</option>
                                <option value="充电限免">充电限免</option>
                            </select>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">是否支持预约</label>
                    <div class="layui-input-block">
                        <input type="radio" name="sex" value="否" title="否" checked="checked">
                        <input type="radio" name="sex" value="是" title="是">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">有卫生间</label>
                    <div class="layui-input-block">
                        <input type="radio" name="sex" value="否" title="否" checked="checked">
                        <input type="radio" name="sex" value="是" title="是">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">有便利店</label>
                    <div class="layui-input-block">
                        <input type="radio" name="sex" value="否" title="否" checked="checked">
                        <input type="radio" name="sex" value="是" title="是">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">有餐厅</label>
                    <div class="layui-input-block">
                        <input type="radio" name="sex" value="否" title="否" checked="checked">
                        <input type="radio" name="sex" value="是" title="是">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">有休息室</label>
                    <div class="layui-input-block">
                        <input type="radio" name="sex" value="否" title="否" checked="checked">
                        <input type="radio" name="sex" value="是" title="是">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">雨棚</label>
                    <div class="layui-input-block">
                        <input type="radio" name="sex" value="否" title="否" checked="checked">
                        <input type="radio" name="sex" value="是" title="是">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">自助洗车</label>
                    <div class="layui-input-block">
                        <input type="radio" name="sex" value="否" title="否" checked="checked">
                        <input type="radio" name="sex" value="是" title="是">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">道闸</label>
                    <div class="layui-input-block">
                        <input type="radio" name="sex1" value="否" title="否" checked="checked">
                        <input type="radio" name="sex1" value="是" title="是">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">地锁</label>
                    <div class="layui-input-block">
                        <input type="radio" name="sex" value="否" title="否" checked="checked">
                        <input type="radio" name="sex" value="是" title="是">
                    </div>
                </div>
                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">备注</label>
                    <div class="layui-input-block">
                        <textarea class="layui-textarea"></textarea>
                    </div>
                </div>


                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button class="layui-btn" lay-submit="" lay-filter="demo1">立即提交</button>
                        <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                    </div>
                </div>
            </form>
        </div>
    </div>

    <script src="/lib/layui-v2.6.3/layui.js" charset="utf-8"></script>
    <!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
    <script>
        layui.use(['form', 'layedit', 'laydate'], function () {
            var form = layui.form
                , layer = layui.layer
                , layedit = layui.layedit
                , laydate = layui.laydate;

            //日期
            laydate.render({
                elem: '#date'
            });
            laydate.render({
                elem: '#date1'
            });

            //创建一个编辑器
            var editIndex = layedit.build('LAY_demo_editor');

            //自定义验证规则
            form.verify({
                title: function (value) {
                    if (value.length < 5) {
                        return '标题至少得5个字符啊';
                    }
                }
                , pass: [
                    /^[\S]{6,12}$/
                    , '密码必须6到12位，且不能出现空格'
                ]
                , content: function (value) {
                    layedit.sync(editIndex);
                }
            });

            //监听指定开关
            form.on('switch(switchTest)', function (data) {
                layer.msg('开关checked：' + (this.checked ? 'true' : 'false'), {
                    offset: '6px'
                });
                layer.tips('温馨提示：请注意开关状态的文字可以随意定义，而不仅仅是ON|OFF', data.othis)
            });

            //监听提交
            form.on('submit(demo1)', function (data) {
                layer.alert(JSON.stringify(data.field), {
                    title: '最终的提交信息'
                })
                return false;
            });

            //表单初始赋值
            form.val('example', {
                "username": "贤心" // "name": "value"
                , "password": "123456"
                , "interest": 1
                , "like[write]": true //复选框选中状态
                , "close": true //开关状态
                , "sex": "女"
                , "desc": "我爱 layui"
            })


        });
    </script>

</body>

</html>